package com.webchat.rmi.config;


import com.webchat.rmi.filter.RpcRequestPermissionFilter;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.context.annotation.Bean;

public class RpcRequestFilterAutoConfig {


    @Bean
    public FilterRegistrationBean<RpcRequestPermissionFilter> registrationRpcRequestFilter() {
        FilterRegistrationBean<RpcRequestPermissionFilter> registration = new FilterRegistrationBean<>();
        registration.setFilter(new RpcRequestPermissionFilter());
        registration.addUrlPatterns("/*");
        registration.setName("rpcRequestFilter");
        registration.setOrder(-1);
        return registration;
    }


}
